Optimal. Leaf size=214 \[ 2 \sqrt {1+x}+\frac {\tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {1+x}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )}{\sqrt {2 \left (1+\sqrt {2}\right )}}-\frac {\tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+x}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )}{\sqrt {2 \left (1+\sqrt {2}\right )}}+\frac {1}{2} \sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \log \left (1+\sqrt {2}+x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )-\frac {1}{2} \sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \log \left (1+\sqrt {2}+x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 214, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {839, 841,
1183, 648, 632, 210, 642} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {x+1}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{\sqrt {2 \left (1+\sqrt {2}\right )}}-\frac {\text {ArcTan}\left (\frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{\sqrt {2 \left (1+\sqrt {2}\right )}}+2 \sqrt {x+1}+\frac {1}{2} \sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \log \left (x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1\right )-\frac {1}{2} \sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \log \left (x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 632
Rule 642
Rule 648
Rule 839
Rule 841
Rule 1183
Rubi steps
\begin {align*} \int \frac {x \sqrt {1+x}}{1+x^2} \, dx &=2 \sqrt {1+x}+\int \frac {-1+x}{\sqrt {1+x} \left (1+x^2\right )} \, dx\\ &=2 \sqrt {1+x}+2 \text {Subst}\left (\int \frac {-2+x^2}{2-2 x^2+x^4} \, dx,x,\sqrt {1+x}\right )\\ &=2 \sqrt {1+x}+\frac {\text {Subst}\left (\int \frac {-2 \sqrt {2 \left (1+\sqrt {2}\right )}-\left (-2-\sqrt {2}\right ) x}{\sqrt {2}-\sqrt {2 \left (1+\sqrt {2}\right )} x+x^2} \, dx,x,\sqrt {1+x}\right )}{2 \sqrt {1+\sqrt {2}}}+\frac {\text {Subst}\left (\int \frac {-2 \sqrt {2 \left (1+\sqrt {2}\right )}+\left (-2-\sqrt {2}\right ) x}{\sqrt {2}+\sqrt {2 \left (1+\sqrt {2}\right )} x+x^2} \, dx,x,\sqrt {1+x}\right )}{2 \sqrt {1+\sqrt {2}}}\\ &=2 \sqrt {1+x}-\frac {1}{2} \sqrt {3-2 \sqrt {2}} \text {Subst}\left (\int \frac {1}{\sqrt {2}-\sqrt {2 \left (1+\sqrt {2}\right )} x+x^2} \, dx,x,\sqrt {1+x}\right )-\frac {1}{2} \sqrt {3-2 \sqrt {2}} \text {Subst}\left (\int \frac {1}{\sqrt {2}+\sqrt {2 \left (1+\sqrt {2}\right )} x+x^2} \, dx,x,\sqrt {1+x}\right )+\frac {1}{2} \sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \text {Subst}\left (\int \frac {-\sqrt {2 \left (1+\sqrt {2}\right )}+2 x}{\sqrt {2}-\sqrt {2 \left (1+\sqrt {2}\right )} x+x^2} \, dx,x,\sqrt {1+x}\right )-\frac {1}{2} \sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \text {Subst}\left (\int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 x}{\sqrt {2}+\sqrt {2 \left (1+\sqrt {2}\right )} x+x^2} \, dx,x,\sqrt {1+x}\right )\\ &=2 \sqrt {1+x}+\frac {1}{2} \sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \log \left (1+\sqrt {2}+x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )-\frac {1}{2} \sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \log \left (1+\sqrt {2}+x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )+\sqrt {3-2 \sqrt {2}} \text {Subst}\left (\int \frac {1}{2 \left (1-\sqrt {2}\right )-x^2} \, dx,x,-\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+x}\right )+\sqrt {3-2 \sqrt {2}} \text {Subst}\left (\int \frac {1}{2 \left (1-\sqrt {2}\right )-x^2} \, dx,x,\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+x}\right )\\ &=2 \sqrt {1+x}+\sqrt {\frac {1}{2} \left (-1+\sqrt {2}\right )} \tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {1+x}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )-\sqrt {\frac {1}{2} \left (-1+\sqrt {2}\right )} \tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+x}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )+\frac {1}{2} \sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \log \left (1+\sqrt {2}+x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )-\frac {1}{2} \sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \log \left (1+\sqrt {2}+x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.08, size = 68, normalized size = 0.32 \begin {gather*} 2 \sqrt {1+x}-\sqrt {-1+i} \tan ^{-1}\left (\sqrt {-\frac {1}{2}-\frac {i}{2}} \sqrt {1+x}\right )-\sqrt {-1-i} \tan ^{-1}\left (\sqrt {-\frac {1}{2}+\frac {i}{2}} \sqrt {1+x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.51, size = 167, normalized size = 0.78
method | result | size |
derivativedivides | \(2 \sqrt {1+x}+\frac {\ln \left (1+x +\sqrt {2}-\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{4}-\frac {\left (\sqrt {2}-1\right ) \arctan \left (\frac {2 \sqrt {1+x}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}-\frac {\ln \left (1+x +\sqrt {2}+\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{4}+\frac {\left (1-\sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+x}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\) | \(167\) |
default | \(2 \sqrt {1+x}+\frac {\ln \left (1+x +\sqrt {2}-\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{4}-\frac {\left (\sqrt {2}-1\right ) \arctan \left (\frac {2 \sqrt {1+x}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}-\frac {\ln \left (1+x +\sqrt {2}+\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{4}+\frac {\left (1-\sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+x}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\) | \(167\) |
risch | \(2 \sqrt {1+x}+\frac {\ln \left (1+x +\sqrt {2}-\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{4}-\frac {\arctan \left (\frac {2 \sqrt {1+x}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{\sqrt {-2+2 \sqrt {2}}}+\frac {\arctan \left (\frac {2 \sqrt {1+x}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}-\frac {\ln \left (1+x +\sqrt {2}+\sqrt {1+x}\, \sqrt {2+2 \sqrt {2}}\right ) \sqrt {2+2 \sqrt {2}}}{4}+\frac {\arctan \left (\frac {2 \sqrt {1+x}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}-\frac {\arctan \left (\frac {2 \sqrt {1+x}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{\sqrt {-2+2 \sqrt {2}}}\) | \(240\) |
trager | \(2 \sqrt {1+x}+\frac {\RootOf \left (\textit {\_Z}^{2}+16 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2}-2\right ) \ln \left (-\frac {64 \RootOf \left (\textit {\_Z}^{2}+16 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2}-2\right ) \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{4} x -12 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2} \RootOf \left (\textit {\_Z}^{2}+16 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2}-2\right ) x -48 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2} \sqrt {1+x}+20 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2} \RootOf \left (\textit {\_Z}^{2}+16 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2}-2\right )-\RootOf \left (\textit {\_Z}^{2}+16 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2}-2\right ) x +7 \sqrt {1+x}-5 \RootOf \left (\textit {\_Z}^{2}+16 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2}-2\right )}{16 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2} x -x -1}\right )}{2}+2 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right ) \ln \left (-\frac {256 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{5} x -16 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{3} x -80 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{3}+48 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2} \sqrt {1+x}-6 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right ) x -10 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )+\sqrt {1+x}}{16 \RootOf \left (128 \textit {\_Z}^{4}-16 \textit {\_Z}^{2}+1\right )^{2} x -x +1}\right )\) | \(420\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.72, size = 307, normalized size = 1.43 \begin {gather*} -\frac {1}{8} \cdot 2^{\frac {1}{4}} {\left (\sqrt {2} + 2\right )} \sqrt {-2 \, \sqrt {2} + 4} \log \left (\frac {1}{2} \cdot 2^{\frac {1}{4}} \sqrt {x + 1} {\left (\sqrt {2} + 2\right )} \sqrt {-2 \, \sqrt {2} + 4} + x + \sqrt {2} + 1\right ) + \frac {1}{8} \cdot 2^{\frac {1}{4}} {\left (\sqrt {2} + 2\right )} \sqrt {-2 \, \sqrt {2} + 4} \log \left (-\frac {1}{2} \cdot 2^{\frac {1}{4}} \sqrt {x + 1} {\left (\sqrt {2} + 2\right )} \sqrt {-2 \, \sqrt {2} + 4} + x + \sqrt {2} + 1\right ) + \frac {1}{2} \cdot 2^{\frac {3}{4}} \sqrt {-2 \, \sqrt {2} + 4} \arctan \left (\frac {1}{4} \cdot 2^{\frac {3}{4}} \sqrt {2^{\frac {1}{4}} \sqrt {x + 1} {\left (\sqrt {2} + 2\right )} \sqrt {-2 \, \sqrt {2} + 4} + 2 \, x + 2 \, \sqrt {2} + 2} {\left (\sqrt {2} + 2\right )} \sqrt {-2 \, \sqrt {2} + 4} - \frac {1}{2} \cdot 2^{\frac {3}{4}} \sqrt {x + 1} {\left (\sqrt {2} + 1\right )} \sqrt {-2 \, \sqrt {2} + 4} - \sqrt {2} - 1\right ) + \frac {1}{2} \cdot 2^{\frac {3}{4}} \sqrt {-2 \, \sqrt {2} + 4} \arctan \left (\frac {1}{4} \cdot 2^{\frac {3}{4}} \sqrt {-2^{\frac {1}{4}} \sqrt {x + 1} {\left (\sqrt {2} + 2\right )} \sqrt {-2 \, \sqrt {2} + 4} + 2 \, x + 2 \, \sqrt {2} + 2} {\left (\sqrt {2} + 2\right )} \sqrt {-2 \, \sqrt {2} + 4} - \frac {1}{2} \cdot 2^{\frac {3}{4}} \sqrt {x + 1} {\left (\sqrt {2} + 1\right )} \sqrt {-2 \, \sqrt {2} + 4} + \sqrt {2} + 1\right ) + 2 \, \sqrt {x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 4.07, size = 68, normalized size = 0.32 \begin {gather*} 2 \sqrt {x + 1} - 4 \operatorname {RootSum} {\left (512 t^{4} + 32 t^{2} + 1, \left ( t \mapsto t \log {\left (- 128 t^{3} + \sqrt {x + 1} \right )} \right )\right )} + 2 \operatorname {RootSum} {\left (128 t^{4} + 16 t^{2} + 1, \left ( t \mapsto t \log {\left (64 t^{3} + 4 t + \sqrt {x + 1} \right )} \right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.19, size = 167, normalized size = 0.78 \begin {gather*} -\frac {1}{2} \, \sqrt {2 \, \sqrt {2} - 2} \arctan \left (\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} + 2 \, \sqrt {x + 1}\right )}}{2 \, \sqrt {-\sqrt {2} + 2}}\right ) - \frac {1}{2} \, \sqrt {2 \, \sqrt {2} - 2} \arctan \left (-\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} - 2 \, \sqrt {x + 1}\right )}}{2 \, \sqrt {-\sqrt {2} + 2}}\right ) - \frac {1}{4} \, \sqrt {2 \, \sqrt {2} + 2} \log \left (2^{\frac {1}{4}} \sqrt {x + 1} \sqrt {\sqrt {2} + 2} + x + \sqrt {2} + 1\right ) + \frac {1}{4} \, \sqrt {2 \, \sqrt {2} + 2} \log \left (-2^{\frac {1}{4}} \sqrt {x + 1} \sqrt {\sqrt {2} + 2} + x + \sqrt {2} + 1\right ) + 2 \, \sqrt {x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 201, normalized size = 0.94 \begin {gather*} 2\,\sqrt {x+1}+\mathrm {atanh}\left (\frac {\sqrt {x+1}}{4\,\sqrt {\frac {\sqrt {2}}{8}+\frac {1}{8}}}-\frac {\sqrt {x+1}}{4\,\sqrt {\frac {1}{8}-\frac {\sqrt {2}}{8}}}+\frac {\sqrt {2}\,\sqrt {x+1}}{8\,\sqrt {\frac {1}{8}-\frac {\sqrt {2}}{8}}}+\frac {\sqrt {2}\,\sqrt {x+1}}{8\,\sqrt {\frac {\sqrt {2}}{8}+\frac {1}{8}}}\right )\,\left (2\,\sqrt {\frac {1}{8}-\frac {\sqrt {2}}{8}}-2\,\sqrt {\frac {\sqrt {2}}{8}+\frac {1}{8}}\right )-\mathrm {atanh}\left (\frac {\sqrt {x+1}}{4\,\sqrt {\frac {1}{8}-\frac {\sqrt {2}}{8}}}+\frac {\sqrt {x+1}}{4\,\sqrt {\frac {\sqrt {2}}{8}+\frac {1}{8}}}-\frac {\sqrt {2}\,\sqrt {x+1}}{8\,\sqrt {\frac {1}{8}-\frac {\sqrt {2}}{8}}}+\frac {\sqrt {2}\,\sqrt {x+1}}{8\,\sqrt {\frac {\sqrt {2}}{8}+\frac {1}{8}}}\right )\,\left (2\,\sqrt {\frac {1}{8}-\frac {\sqrt {2}}{8}}+2\,\sqrt {\frac {\sqrt {2}}{8}+\frac {1}{8}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________